import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
  Switch,
  Route
} from 'react-router-dom';

import ProjectBar from '../leftbar/project';
import ServiceList from '../servs/list';
import ProjectSetting from './setting';
import AddTask from '../task/add';
import TrashTaskList from '../task/trash';

import { URL } from '../../config';

class App extends Component {
  render () {
    return (
      <div>
        <div className="drawer_nav">
          <ProjectBar />
        </div>
        <div className="item_box">
          <Switch>
            <Route path={URL.addtask_page} component={AddTask} />
            <Route path={URL.trashtask_page} component={TrashTaskList} />
            <Route path={URL.project_setting_page} component={ProjectSetting} />
            <Route path={URL.project_page} component={ServiceList} />
          </Switch>
        </div>
      </div>
    )
  }
}

function mapStateToProps (state) {
  return {
  }
}

export default connect(mapStateToProps)(App);